package cn.edu.fzu.homemaking.company.domain.enums;

/**
 * @author wanjie
 * @version 1.0
 */
public enum ServerStatusEnum {
    OFF(0, "下架"),
    ON(1, "上架");

    private final int    value;

    private final String desc;

    private ServerStatusEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }


    public int getValue() {
        return value;
    }


    public String getDesc() {
        return desc;
    }


    public static ServerStatusEnum parse(int value) {
        switch (value) {
            case 0:
                return OFF;
            case 1:
                return ON;
            default:
                return null;
        }
    }
}
